﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Zoomtel.Auth.Mvc.Attributes;
using Zoomtel.Entity.BaseType;
using Zoomtel.Persist.BaseType.Models;
using Zoomtel.Service.BaseType;
using Zoomtel.Web.Controllers;

namespace Zoomtel.Web.Areas.Admin.Controllers
{
    [Description("基础分类接口")]

    public class BaseTypeController : ModuleController
    {
        BaseTypeService _service;

        public BaseTypeController(BaseTypeService service)
        {
            _service = service;

        }

        [HttpGet]
        [Page]
        public IActionResult Index()
        {
            return View();
        }

        [Description("根据分类Code获取列表")]
        [HttpGet]
        public async Task<IList<OptionResultModel>> Select(string typeCode)
        {
            return await _service.Select(typeCode);

        }

    }
}